// -----------------------------------------------------------------------
//  <copyright file="RoleIntegrationEvents.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024/12/10 14:31:41</last-date>
// -----------------------------------------------------------------------

using DaprPlus.Domain.Events;
using DaprPlus.Identity.Domain.Entities;
using DaprPlus.Mapping;

namespace DaprPlus.Identity.Domain.IntegrationEvents
{
    public record RoleCreatedIntegrationEvent(RoleInRecord[] Dtos) : IntegrationEvent
    { }

    public record RoleUpdatedIntegrationEvent(RoleInRecord[] Dtos) : IntegrationEvent
    { }

    public record RoleSyncIntegrationEvent(RoleInRecord[] Dtos, bool IsSync) : IntegrationEvent
    { }

    public record RoleDeletedIntegrationEvent(long[] Ids) : IntegrationEvent
    { }

    [MapFrom(typeof(Role))]
    public record RoleInRecord(long Id, string Name, bool IsLocked)
    { }
}
